package com.southwind;

/**
 * @author south wind
 * @version 1.0
 * @date 2025/3/18 11:07
 * @description
 */
public class OOPDemo1 {
    public static void main(String[] args) {
        Phone phone = new Phone("小米",1000);
        phone.show();
    }
}

//模板
class Phone{
    public String brand;
    public double price;

    public void show(){
        String brand = "华为";
        double price = 1200;

        System.out.println("品牌是"+this.brand+",价格是"+this.price);
    }

    public Phone(String brand,double price){
        this.brand=brand;
        this.price =price;
    }


}
